-- GENERATED SPELL FOR [Grishna Harbinger] --


function spell0_19989(pUnit, Event) --@Detect Whispers,n/a--
pUnit:FullCastSpellOnTarget(37473,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19989', 571, 1)
end

function spell1_19989(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19989', 3000, 1)
end

function spell2_19989(pUnit, Event) --@Shriveling Gaze,n/a--
pUnit:FullCastSpellOnTarget(37589,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19989', 20000, 1)
end

function Sorts_19989(pUnit, Event)
local choix_sorts_19989 = math.random(0, 2)
if choix_sorts_19989 == 0 then
pUnit:RegisterEvent('spell0_19989', 1, 1)
end
if choix_sorts_19989 == 1 then
pUnit:RegisterEvent('spell1_19989', 1, 1)
end
if choix_sorts_19989 == 2 then
pUnit:RegisterEvent('spell2_19989', 1, 1)
end
end

function mob19989_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19989', math.random(1500, 3000), 1)
end

function mob19989_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19989_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19989_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19989, 1, 'mob19989_Action')
RegisterUnitEvent(19989, 2, 'mob19989_Leave')
RegisterUnitEvent(19989, 3, 'mob19989_Kill')
RegisterUnitEvent(19989, 4, 'mob19989_Die')
